package com.gscitysfy.cus.drain.modules.assets.enums;

/**
 * @author: wangzhipeng
 * @date: 2020/7/9
 * @description: 返回参数枚举
 */
public enum ResponseEnum {
    SUCCESS(200, "操作成功"),
    FAIL(500, "服务暂不可用，请稍后再试"),
    PERMISSION_ERROR(403, "操作没有权限"),
    UNAUTHENTICATED_ERROR(403, "当前未登录认证"),
    PREAUTHORIZE_ERROR(4032, "操作没有权限(PRE)"),
    SESSION_TIMEOUT_ERROR(408, "登录超时，请重新登录！"),
    SESSION_KICKOUT_ERROR(409, "当前账号已在别处登录，您已被踢出！"),
    PARAMETER_ERROR(401, "输入参数有误!{0}"),
    ACTION_ERROR(500, "操作失败"),
    CONFIG_ERROR(1000, "配置项或环境错误！{0}"),
    UPLOAD_ERROR(5001, "上传文件异常"),
    SAVE_FILE_ERROR(5002, "保存文件失败"),
    OPT_FILE_ERROR(5009, "请选择上传文件!"),
    OPT_NOTFILE_ERROR(5009, "不要选择文件!"),

    /*用户管理部分返回 */
    PASSWORD_OR_USERNAME_ERROR(3001, "用户名或者密码错误！"),
    USER_LOGIN_NAME(3003, "用户名重复"),
    VERIFICATION_CODE_ERROR(3004, "验证码错误！"),
    REGISTER_LACK_FILE(5001, "缺少上传的文件"),
    SUBMIT_OLD_PASSWORD(3006, "旧密码错误！"),
    SUBMIT_NEW_PASSWORD(3007, "新密码和原密码重复"),
    CODE_NULL(3010, "未获取到填写的验证码"),
    CODE_NOT_FIND(3011, "验证码错误"),
    EXPORT_FILE_ERROR(6001, "导出文档异常！"),
    NOT_ALLOW_FILE_TYPE(6002, "不支持的文件类型操作！"),
    FILE_PATH_NOT_ALLOW_ERROR(6003, "文件路径错误！"),
    CONTAIN_NOT_ALLOW_FILE_TYPE(6004, "包含不支持上传的文件类型！"),
    FILE_CONTENT_NULL_ERROR(6005, "文件内容为空！"),
    UNSUPPORTED_OPERATION(1001, "不支持的操作"),

    ROLE_ROLENAME(3003, "角色名重复"),
    ROLE_DISENABLED(3004, "角色已被禁用"),
    USER_DISENABLED(3005, "用户已被禁用"),
    ROLE_UNDELETED(3006, "该角色下存在用户，无法删除"),



    /*机构管理相关返回*/
    ORG_NAME(7001,"机构名称重复"),
    ORG_CODE(7002,"机构编码重复"),
    ORG_DISENABLED(7003, "机构已被禁用"),
    ORG_UNDELETED(7004,"该机构下存在用户，无法删除"),

    /*菜单管理相关返回*/
    MODULE_CODE(9001,"菜单编号重复");


    private Integer code;
    private String message;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    ResponseEnum(int i, String s) {
        this.code = i;
        this.message = s;
    }
}
